<extend name="Public/base"/>

<block name="body">
    <script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
    <div class="main-title">
        <h2>赛事管理 【{$game.name}】</h2>
    </div>
    <form action="" method="post" class="form-horizontal">

        <div class="form-item">
            <label class="item-label">赛程安排状态<span class="check-tips"></span></label>
            <div class="controls">
                 <label><input type="radio" name="match_state" value="2">直播中</label>
                 <label><input type="radio" name="match_state" value="1">预告</label>
                 <label><input type="radio" name="match_state" value="0">普通</label>
            </div>
        </div>


        <div class="form-item">
            <label class="item-label">标题<span class="check-tips"></span></label>
            <div class="controls">
                <input type="text" class="text input-large" name="title" value="{$title|htmlspecialchars_decode}">
            </div>
        </div>

        <div class="form-item">
            <label class="item-label">副标题<span class="check-tips"> （短标题，用于APP显示）</span></label>
            <div class="controls">
                <input type="text" class="text input-large" name="subtitle" value="{$subtitle|htmlspecialchars_decode}">
            </div>
        </div>

        <div class="form-item">
            <label class="item-label">赛事日期<span class="check-tips"></span></label>
            <div class="controls">
                <input type="text" class="text input-large time" name="match_time" value="{$match_time|date="Y-m-d",###}"
                placeholder="赛事时间">
            </div>
        </div>

         <div class="form-item cf">
            <label class="item-label">LOGO<span class="check-tips">(400*400px png)</span></label>
            <div class="controls">
                <div class="controls">
                    <input type="file" id="upload_picture_logo">
                    <input type="hidden" name="logo" id="cover_id_logo" value="{$logo}" />
                    <div class="upload-img-box">
                    <notempty name="logo">
                        <div class="upload-pre-item"><img src="__ROOT__{$logo}"/></div>
                    </notempty>
                    </div>
                </div>
                {:hook('adminPicUpload', array('id'=>"upload_picture_logo",'return'=>"cover_id_logo", 'type' => 'path'))}                                                              
            </div>
        </div>

        <div class="form-item cf">
            <label class="item-label">封面<span class="check-tips">(185*95px png/jpg)</span></label>
            <div class="controls">
                <div class="controls">
                    <input type="file" id="upload_picture_cover">
                    <input type="hidden" name="cover" id="cover_id_cover" value="{$cover}" />
                    <div class="upload-img-box">
                        <notempty name="cover">
                        <div class="upload-pre-item"><img src="__ROOT__{$cover}"/></div>
                        </notempty>
                    </div>
                </div>
                {:hook('adminPicUpload', array('id'=>"upload_picture_cover",'return'=>"cover_id_cover", 'type' => 'path'))}                                                              
            </div>
        </div>

        <div class="form-item cf">
            <label class="item-label">战队默认LOGO<span class="check-tips">( 队伍无LOGO默认调用, 使用 120*120, 或者1:1的尺寸,)</span></label>
            <div class="controls">
                <div class="controls">
                    <input type="file" id="upload_picture_teamlogo">
                    <input type="hidden" name="teamlogo" id="teamlogo_id_teamlogo" value="{$teamlogo}" />
                    <div class="upload-img-box">
                        <notempty name="teamlogo">
                        <div class="upload-pre-item"><img src="__ROOT__{$teamlogo}"/></div>
                        </notempty>
                    </div>
                </div>
                {:hook('adminPicUpload', array('id'=>"upload_picture_teamlogo",'return'=>"teamlogo_id_teamlogo", 'type' => 'path'))}                                                              
            </div>
        </div>
        
       <!--  <div class="form-item">
            <label class="item-label">LOGO远程地址<span class="check-tips"> 填写远程地址则使用远程地址作为LOGO地址</span></label>
            <input class="text input-large" name="logo_uri" value="{$logo_uri}" />
        </div> -->
        <div class="form-item">
            <label class="item-label">描述<span class="check-tips"></span></label>
            <div class="controls">
                <label class="textarea input-large">
                    <textarea name="detail">{$detail|htmlspecialchars_decode}</textarea>
                </label>
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">状态<span class="check-tips"></span></label>
            <input type="radio" name="status" <if condition="$status eq 1 or $status eq ''">checked</if> value="1"  /> 开启
            <input type="radio" name="status" <eq name="status" value="0">checked</eq> value="0"  />关闭
        </div>
        <div class="form-item">
            <input type="hidden" name="id" value="{$id}" />
            <input type="hidden" name="game_id" value="{$game_id}" />
            <button class="btn submit-btn ajax-post btn-success btn-block" id="submit" type="submit" target-form="form-horizontal">确 定</button>
            <!-- <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button> -->
        </div>
    </form>
</block>

<block name="script">
    <link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
    <php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
    <link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>

    <script type="text/javascript">
        //导航高亮
        highlight_subnav('{:U('Game/index')}');
        Think.setValue("match_state", '{$match_state|default=0}');

        $(function(){
            $('.time').datetimepicker({
                format: 'yyyy-mm-dd',
                language:"zh-CN",
                minView:2,
                autoclose:true
            });
        });
       
    </script>
</block>
